﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        String f = "您选择的头像是：";
        String[] ff = new string[]{"blackman","sunset","cat"};
        int i = 0;//i is temp array for ff[]

        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = f + ff[0];

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Label1.Text = f + ff[i];
            Image1.ImageUrl = "~/avtar/" + ff[i] + ".png";
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            i = DropDownList1.SelectedIndex;
        }
    }
}